import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import{createPinia} from 'pinia'
import router from "@/router/index.js";
// 引入Element Plus 及 图标
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as Icons from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
const app = createApp(App)
const pinia =createPinia()
app.use(pinia)
app.use(router)
// 挂载ElementPlus
app.use(ElementPlus, {
    locale: zhCn,
})
// 遍历注册Element Plus 图标
for( const [key, component] of Object.entries(Icons)){
    app.component(key, component);
}
app.mount('#app')
